function plotGIRFsChart(GIRFs,shockNum)


% Select the variables to plot
select = [1   2   5   6   11  12  13  14    15   16 17 18];
scaling= [100 400 100 100 400 400 400 400  40000 1  1  1];

lengthGIRFs     = size(GIRFs.IRFy,2);
fontSizeValue   = 16;
figureSize      =  [0 0 1550 600+300]; % (0,0) size in x size in y
figure('Name','IRF','NumberTitle','off','Position',figureSize)
for i=1:length(select)

    % Getting the percentiles
    IRFdist      = zeros(lengthGIRFs+1,9);
    IRFmean      = [0 mean(scaling(i)*GIRFs.IRFy(select(i),:,shockNum,:),4)];
    nameChart = {'10\%-90\%','20\%-80\%','30\%-70\%','40\%-60\%','Mean'};
    for j=1:lengthGIRFs
        IRFdist(1+j,:) = prctile(scaling(i)*squeeze(GIRFs.IRFy(select(i),j,shockNum,:)),10:10:90);
    end

    subplot(3,4,i)
    hold on
    xaxis       = 0:lengthGIRFs;
    nn          = length(xaxis);
    idx         = nn:-1:1;
    reverseaxis = xaxis(idx);
    index       = 1:length(xaxis);
    reversIndex = length(xaxis):-1:1;
    for j=4:-1:1
        CI_upper  = IRFdist(:,5+j);
        CI_lower  = IRFdist(:,5-j);
        grpyat = [xaxis'       CI_upper(index);...
            reverseaxis'  CI_lower(reversIndex)];
        numColor = 0.2*j;
        patch(grpyat(:,1),grpyat(:,2),[numColor numColor numColor],'edgecolor',[numColor numColor numColor]);
    end
    plot(xaxis,IRFmean,'-k','LineWidth',3)

    axis tight
    title(GIRFs.labely(select(i)),'interpreter','latex','FontSize',fontSizeValue+2)
    set(gca,'FontSize',fontSizeValue+2)
    if i == 1
        legend(nameChart,...
            'Position',[0.279270451911821 0.949225718355096 0.452833392670911 0.0369369377101864],...
            'Orientation','horizontal','EdgeColor',[1 1 1],...
            'interpreter','Latex','FontSize',fontSizeValue+2);
    end
end


end